/*
 *  Core.h
 *  allInOne
 *
 *  Created by James Johns on 01/11/2009.
 *  Copyright 2009 xD-Duncesoft. All rights reserved.
 *
 */


#ifndef CORE_CLASS
#define CORE_CLASS

#include "commandLine.h"

class standardTemplate;

#define MAX_COM_REF 64


typedef struct command_reference {
	standardTemplate *pluginClass;
	int functionNumber;
} commandReference;

class Core {
public:
	Core();
	~Core();
	
	void registerCommand(const char *command, commandReference *plugin);	// register a command
																			// to run the registered command
																			// the user must enter the <const char *command>
																			// and we will run the relative plugin.
	
	void receivedCommand(char *command);									// used to send commands to relative classes
																			// <const char *command> should contain everything
																			// the user has entered including parameters.
	
	void requestCommand(const char *command);
	
	
private:
	commandLine *terminal;
	
	int numberOfCommands;
	char *commands[MAX_COM_REF];
	commandReference comRefs[MAX_COM_REF];
};


#endif